#include <iostream>
using namespace std;
int main()
{
   int num{1};
   int num2{9};
   int &ref = num;
   ref++;
   cout << "num is " << num << endl;
   // 1、引用一旦绑定， 不能 再“指向”别的对象
   ref = num2; // 这里不是让ref引用num2，而是把num2的值赋值给num
   cout << "num is " << num << endl;

   // 2、引用的引用
   int &ref2 = ref;
   ref2++;
   cout << "num is " << num << endl;
   return 0;
}
